<template>
    <div>
        <h1>会员等级显示</h1>
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <td>Id</td>
                    <td>会员名称</td>
                    <td>累计消费金额</td>
                    <td>操作</td>
                </tr>

                <tr v-for="itme in data" :key="itme.Id">
                    <td>{{ itme.Id }}</td>
                    <td>{{ itme.Name }}</td>
                    <td>{{ itme.Price }}</td>
                    <td><input type='button' value="删除" class="btn btn-danger"></td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue'
import axios from 'axios';
import { useStore } from '@/stores/user'
import { useRouter } from 'vue-router';
const rouder = useRouter();
const abc = useStore();
let data: any = ref([])
onMounted(() => {
    getlist();
})

const getlist = () => {
    axios({
        url: '/api/Hy/All',
        method: 'get'

    })
        .then((res) => {
            console.log(res);
            data.value = res.data

        })
        .catch((err) => {
            console.log(err);

        })
}
</script>

<style scoped></style>